- @no_container = true
- page_title "标记"
- hide_class = ''
= render "projects/issues/head"

%div{ class: container_class }
  .top-area.adjust
    .nav-text
      标记可应用于问题和合并请求。为标签加注星标，使其成为优先标签。 通过拖动来排列优先标签以更改其相对优先级。

    .nav-controls
      - if can?(current_user, :admin_label, @project)
        = link_to new_namespace_project_label_path(@project.namespace, @project), class: "btn btn-new" do
          新建标记

  .labels
    - if can?(current_user, :admin_label, @project)
      -# Only show it in the first page
      - hide = @project.labels.empty? || (params[:page].present? && params[:page] != '1')
      .prioritized-labels{ class: ('hide' if hide) }
        %h5 优先标签
        %ul.content-list.manage-labels-list.js-prioritized-labels{ "data-url" => set_priorities_namespace_project_labels_path(@project.namespace, @project) }
          %p.empty-message{ class: ('hidden' unless @prioritized_labels.empty?) } No prioritized labels yet
          - if @prioritized_labels.present?
            = render @prioritized_labels
    .other-labels
      - if can?(current_user, :admin_label, @project)
        %h5{ class: ('hide' if hide) } 其它标签
      - if @labels.present?
        %ul.content-list.manage-labels-list.js-other-labels
          = render @labels
        = paginate @labels, theme: 'gitlab'
      - else
        .nothing-here-block
          - if can?(current_user, :admin_label, @project)
            创建一个标记或者 #{link_to '生成默认标记组', generate_namespace_project_labels_path(@project.namespace, @project), method: :post}.
          - else
            没有标记被创建
